﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AlbumManagement.ascx.cs"
    Inherits="Admin_UserControls_AlbumManagement" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<style type="text/css">
    .menuleft_small
    {
        width: 225px;
    }
    .menuleft_lagre
    {
        width: 300px;
    }
    .errorMessage
    {
        color: Red;
    }
    .button
    {
        width: 85px;
    }
</style>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<div>
    <asp:Panel ID="Panel1" runat="server">
        <div class="title">
            <h5>
                QUẢN LÝ ALBUM
            </h5>
        </div>
        <div class="table">
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" GridLines="None"
                AllowPaging="True" OnPreRender="RadGrid1_PreRender" OnItemCommand="RadGrid1_iTemcommand"
                AutoGenerateColumns="False" Skin="Office2007">
                <MasterTableView CommandItemDisplay="TopAndBottom" NoMasterRecordsText="Không có kết quả">
                    <CommandItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Files/images/add.gif" />
                        <asp:LinkButton ID="LinkButton_Add" runat="server" CommandName="Them" AccessKey="N">Thêm Album</asp:LinkButton>
                    </CommandItemTemplate>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="album_id" DataType="System.Int32" HeaderText="UserID"
                            UniqueName="album_id" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn Text="Xem" UniqueName="Xem" CommandName="Xem" ImageUrl="~/Files/images/view.gif"
                            HeaderImageUrl="~/Files/images/view.gif">
                        </telerik:GridButtonColumn>
                        <telerik:GridBoundColumn DataField="album_name" HeaderText="Tên Album" UniqueName="album_name">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="username" HeaderText="Người tạo" UniqueName="username">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="description" HeaderText="Mô tả" UniqueName="description">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="created_date" HeaderText="Ngày tạo" UniqueName="created_date"
                            DataType="System.DateTime" DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn Text="Sửa" UniqueName="Sua" CommandName="Sua" ImageUrl="~/Files/images/edit.gif"
                            HeaderImageUrl="~/Files/images/edit.gif">
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn Text="Xóa" UniqueName="Xoa" CommandName="Xoa" ConfirmText="Bạn có chắc chắn muốn xóa?"
                            ImageUrl="~/Files/images/delete.gif" HeaderImageUrl="~/Files/images/delete.gif">
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
            </telerik:RadGrid>
        </div>
    </asp:Panel>
</div>
<div>
    <asp:Panel ID="Panel2" runat="server">
        <div class="title">
            <h5>
                THÊM ALBUM
            </h5>
        </div>
        <div class="table">
            <table style="width: 100%; margin-top: 25px;">
                <tr>
                    <td style="width: 20%">
                        Tên Album:
                    </td>
                    <td style="width: 225px">
                        <asp:TextBox ID="TextBox_AlbumName" runat="server" MaxLength="50" CssClass="menuleft_small"></asp:TextBox>
                    </td>
                    <td>
                        *
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Không được để trống"
                            ControlToValidate="TextBox_AlbumName" ValidationGroup="AddAlbum"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr valign="middle">
                    <td>
                        Mô tả:
                    </td>
                    <td valign="middle">
                        <asp:TextBox ID="TextBox_Description" runat="server" CssClass="menuleft_small" Rows="5"
                            TextMode="MultiLine"></asp:TextBox>
                    </td>
                    <td>
                        *
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Không được để trống"
                            ControlToValidate="TextBox_Description" ValidationGroup="AddAlbum"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Label ID="Label_Result" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="Button_OK" runat="server" ValidationGroup="AddAlbum" CssClass="button"
                            Text="OK" Width="85px" OnClick="Button_OK_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</div>
<div>
    <asp:Panel ID="Panel3" runat="server">
        <div class="title">
            <h5>
                THÊM ALBUM
            </h5>
        </div>
        <div class="table">
            <table style="width: 100%; margin-top: 25px;">
                <tr>
                    <td style="width: 20%">
                    </td>
                    <td style="width: 80%">
                        <telerik:RadUpload ID="RadUpload1" runat="server" InitialFileInputsCount="5" Skin="Windows7"
                            Culture="Vietnamese (Vietnam)" Width="500px">
                            <Localization Add="Thêm ảnh" Clear="Chọn lại tất cả" Delete="Xóa ảnh" Remove="Bỏ ảnh này"
                                Select="Chọn tệp" />
                        </telerik:RadUpload>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
                        <%--<telerik:RadProgressArea ID="RadProgressArea1" runat="server" Culture="Vietnamese (Vietnam)"
                            DisplayCancelButton="True" Skin="Windows7">
                            <Localization Cancel="Hủy bỏ" CurrentFileName="Đang tải ảnh: " ElapsedTime="Thời gian đã tải: "
                                EstimatedTime="Thời gian còn lại: " Total="Tổng:" TotalFiles="Tổng số tệp: "
                                TransferSpeed="Tốc độ: " Uploaded="Đã tải lên:" UploadedFiles="Đã tải lên: " />
                        </telerik:RadProgressArea>--%>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Label ID="Label_ResultUpload" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="Button_Upload" CssClass="button" runat="server" Text="Hoàn tất" OnClick="Button_Upload_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</div>
<div>
    <%--<asp:Panel ID="Panel4" runat="server">
        <telerik:RadGrid ID="RadGrid2" runat="server" AllowSorting="True" GridLines="None"
            AllowPaging="True" OnPreRender="RadGrid1_PreRender" OnItemCommand="RadGrid1_iTemcommand"
            AutoGenerateColumns="False" Skin="Office2007">
            <MasterTableView NoMasterRecordsText="Không có kết quả">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="photo_id" DataType="System.Int32" HeaderText="UserID"
                        UniqueName="photo_id" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn Text="Xem" UniqueName="Xem" CommandName="Xem" ImageUrl="~/Files/images/view.gif"
                        HeaderImageUrl="~/Files/images/view.gif">
                    </telerik:GridButtonColumn>
                    <telerik:GridImageColumn DataType="System.String" DataImageUrlFields="PhotoPath"
                        DataImageUrlFormatString="../../{File}.jpg" AlternateText="Customer image" DataAlternateTextField="ContactName"
                        ImageAlign="Middle" ImageHeight="110px" ImageWidth="90px" HeaderText="Hình ảnh" />
                    <telerik:GridBoundColumn DataField="caption" HeaderText="Mô tả" UniqueName="caption">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="username" HeaderText="Người tạo" UniqueName="username">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn Text="Sửa" UniqueName="Sua" CommandName="Sua" ImageUrl="~/Files/images/edit.gif"
                        HeaderImageUrl="~/Files/images/edit.gif">
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn Text="Xóa" UniqueName="Xoa" CommandName="Xoa" ConfirmText="Bạn có chắc chắn muốn xóa?"
                        ImageUrl="~/Files/images/delete.gif" HeaderImageUrl="~/Files/images/delete.gif">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
        </telerik:RadGrid>
    </asp:Panel>--%>
</div>
